home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / modems / mod_m2z / one_file / one_file.bts < prev   
Encoding:
Text File  |  1995-05-02  |  3.3 KB  |  81 lines

  1. //ONE_FILE.BTS for STalker 3.x by Bob Morrow (GEnie - R.MORROW10).
  2. //This file is useful for GEnie only, unless someone modifies it for
  3. //another online service.  (Go for it!)  It lets you pick which
  4. //RoundTable to go to and the file number, then calls GEnie and
  5. //makes it's way to the library you specified, grabs the file and
  6. //hangs up.  This presumes you know the file number you're after,
  7. //since that number is a requirement.  
  8. //
  9. //Operation is simple.  Start the script, enter the page number of
  10. //the RoundTable library where your file is located, then enter the
  11. //file's number.  Hit <return> after each entry.  Since the script
  12. //uses the dial_one() command, after the file number is entered the
  13. //script tells the autodialer to do it's thing, which includes
  14. //sending autologon strings!  Once all autologon strings are passed,
  15. //the script takes over again.  NOTE:  Do -not- enter m<page>;3 like
  16. //you normally would. (e.g. m475;3)  Just enter the page #; the script
  17. //adds the m and ;3 for you!
  18. //
  19. //Make sure your autodialer entry for GEnie is spelled like that,
  20. //not GEnie1, General Electric Net, etc.  The script's dial_one()
  21. //command looks for GEnie.  It is case-insensitive, which means
  22. //genie is also ok.
  23. //
  24. //Due to the nature of the port_printf() command, once you're logged
  25. //onto GEnie, it will not display m<page>;3 or the file number, but
  26. //they are there.  All other commands are echoed to the screen,
  27. //since they use port_send().
  28. //
  29. //Shift/Alt/Undo is the only way to stop the script cleanly.  If you
  30. //just press Undo, it will just advance to the next line in the
  31. //script.  This is true of all scripts, not just this one, though I
  32. //would like to find a better solution.  Your comm settings may have
  33. //been affected as well.
  34. //
  35. //If for some reason you entered the wrong file number, this script
  36. //as it stands now can't deal with that.  It keeps waiting for a
  37. //GEnie string that will never come.
  38.  
  39. function main()
  40. string page[10];
  41. string file[10];
  42. int numchars;
  43.  
  44.  
  45. puts("\r\nEnter the page number of the RoundTable library you want to go to: \r\n");
  46. numchars=gets(page,6);
  47.  
  48. puts("\r\nEnter the file number you want to download: \r\n");
  49. numchars=gets(file,7);
  50. puts("\r\n");
  51.  
  52.     dial_one("GEnie", NULL); //Script allows autodialer's
  53.                          //autologon sequence to do it's
  54.                          //thing, then takes over.
  55.     wait_for("or <CR> to continue?",0);
  56.     port_printf("m%s 3\r",page);    //Script moves to the page number
  57.     wait_for("Library?",0);
  58.     port_send("6\r", TRUE);
  59.     wait_for("request or <H>elp?",0);
  60.     port_printf("%s\r",file);    //Script enters the file number
  61.  
  62. //        if not wait_for ("Again (Y/N)?",0) then    //Can't find file,
  63. //        port_send("n\r");                    //so let's log off.
  64. //        wait_for("Library?",0);                //This isn't working!
  65. //        port_send("bye\r", TRUE);
  66. //        endif
  67. //        else
  68.  
  69.     wait_for("?",0);
  70.     port_send("d\r", TRUE);
  71.     wait_for("<RETURN> to skip?",0);
  72.     port_send("4\r", TRUE);        //Script downloads file via ZModem
  73.     set_protocol(4);
  74.     download();
  75.     wait_for("another file (Y/N)?",0);
  76.     port_send("n\r",TRUE); 
  77.     wait_for("Library?",0);
  78.     port_send("bye\r",TRUE);        //Hey, we didn't get caught! Let's 
  79.                             //get outta here.
  80.     endfunction
  81.